package com.gxa.weixing.core.util;

import org.apache.shiro.crypto.hash.SimpleHash;
import org.apache.shiro.util.ByteSource;

/**
 * @ClassName ShiroMd5
 * @Author: ws
 * @date 2021/12/24 11:06
 */
public class ShiroMd5 {

    public static String shiroMd5(String password){
        // 加密方式
        String hashAlgorithmName = "MD5";
        // 盐值
        ByteSource salt = ByteSource.Util.bytes("YYDS@&^#$@#");
        // 加密11次
        int hashIterations = 11;
        return new SimpleHash(hashAlgorithmName, password, salt, hashIterations).toString();
    }

}
